package main

import (
	"bytes"
	"io"
	"net/http"
)

func HttpPostJson(url string, data []byte) ([]byte, error) {
	body := bytes.NewBuffer(data)
	resp, err := http.Post(url, "application/json", body)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()

	return io.ReadAll(resp.Body)

}
